import requests

# 请求url  请求头 请求体
url="http://tpshop-test.itheima.net/index.php?m=Home&c=User&a=do_login"
headers = {"Content-Type": "application/x-www-form-urlencoded"}
body = {"username": "18210000000", "password": "123456", "verify_code": "8888"}
resq=requests.post(url,headers=headers,data=body)
print(resq.text)
print(resq.status_code)
print(resq.json())

# 人力资源管理请求
url="http://ihrm-test.itheima.net/api/sys/login"
body={"mobile":"13800000002","password":"123456"}
resq=requests.post(url,json=body)
print(resq.text)
print(resq.status_code)
print(resq.json())